home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-20 | 3.6 KB | 94 lines | [TEXT/MPS ] |
- /*
- File: HWSpecific.h
-
- Contains: This file contains macros and structures for the ABC Vendor
- Ethernet DLPI.
-
- Written by:
-
- Copyright: © 1993-1994 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
-
- To Do:
- */
-
- //#define kPCIDeviceInfoName "\ppci1234,5678" // pascal string,vendor ID & device id
- //#define kModuleDeviceInfoName "pci1234,5678" // c string, vendor ID & device id
-
- #define kPCIDeviceInfoName "\ppci1022,2000" // pascal string,vendor ID & device id
- #define kModuleDeviceInfoName "pci1022,2000" // c string, vendor ID & device id
-
- //#define kPCIDeviceInfoName "\ppci1011,2" // pascal string,vendor ID & device id
- //#define kModuleDeviceInfoName "pci1011,2" // c string, vendor ID & device id
-
- //#define kPCIDeviceInfoName "\p00000C5,FastEtherTX" // pascal string,vendor ID & device id
- //#define kModuleDeviceInfoName "00000C5,FastEtherTX" // c string, vendor ID & device id
-
- //-----------------------------------------------------------------------------------------
- // Generic enums
- //-----------------------------------------------------------------------------------------
-
- enum BooleanStates
- {
- kFalse = 0,
- kTrue = 1
- };
-
- enum InterruptStates
- {
- kNoInterrupts = 0,
- kTxInterrupts = 1,
- kRxInterrupts = 2,
- kBothTxRxInterrupts = 3
- };
-
- //-----------------------------------------------------------------------------------------
- // Private driver flags for privateFlags variable in dlpiPrivateData
- //-----------------------------------------------------------------------------------------
- #define kpfFraming8022 0x00000001
-
- //-----------------------------------------------------------------------------------------
- // DLPI Private Data structure
- //-----------------------------------------------------------------------------------------
-
- struct DLPIPrivateData
- {
- UInt32 privateFlags; // 32 1 bit flags for driver usage
- QHdr dlpiStreamsQueue; // linked list of active streams
- QHdr RxPacketQueue; // linked list of received packets
- QHdr TxPacketQueue; // linked list of packets to transmit
- UInt8 ourEAddress[6]; // store our Ethernet address
- SInt32 TxDeferredTaskCookie;
- SInt32 RxDeferredTaskCookie;
- RegEntryID nodeEntryID; // our entry in the Name Registry
- UInt32 cardBaseAddr; // only necessary for memory mapped cards
- UInt16 currentMinorDeviceNumber; // minor device number used in open
- };
-
- typedef struct DLPIPrivateData DLPIPrivateData;
-
- //-----------------------------------------------------------------------------------------
- // Function Prototypes
- //-----------------------------------------------------------------------------------------
-
- void EnqueueElementAtHead(QHdr *theQHdr, QElem *theElem, UInt16 whichIntsOff);
- void EnqueueElement(QHdr *theQHdr, QElem *theElem, UInt16 whichIntsOff);
- QElem *DequeueHead(QHdr *theHdr, UInt16 whichIntsOff);
- QElem *DequeueElement(QHdr *theQHdr, QElem *theElem, UInt16 whichIntsOff);
-
-
- Boolean ABCVendorIsThisOurCard(RegEntryID *theID, UInt32 cardAddress);
- void ABCVendorDisableInterrupts(UInt16 whichIntsOff);
- void ABCVendorEnableInterrupts(UInt16 whichIntsOn);
- SInt32 ABCVendorRegisterMulticast(UInt8 *mcAddress);
- SInt32 ABCVendorUnregisterMulticast(UInt8 *mcAddress);
- void ABCVendorInitialize(RegEntryID *theID);
- void ABCVendorClose(void);
- void ABCVendorTransmitOnePacket(mblk_t *thePacket, UInt16 packetSize);
- OSErr ABCVendorCheckTransmitterStatus(UInt16 packetSize);
- SInt32 ABCVendorSetEthernetAddress(UInt8 *physicalAddress);
- void ABCVendorGetFactoryEthernetAddress(UInt8 *addressArray);
- InterruptMemberNumber ABCVendorISR(InterruptSetMember member, void *refCon, UInt32 theIntCount);
-